package baseTest;

public class swapPairs {
    public static void main(String[] args) {

    }

    public ListNode process(ListNode head){
        if(head == null || head.next == null){
            return head;
        }
        ListNode next = head.next;
        head.next = process(next.next);
        next.next = head;
        return next;
    }
}
